//
//  CoreDataManager.h
//  高级课06数据持久化CoreData
//
//  Created by 邝子涵 on 15/11/20.
//  Copyright © 2015年 邝子涵. All rights reserved.
//

#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
@interface CoreDataManager : NSObject

+ (CoreDataManager *)defaults;


// 数据管理器
@property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
// 数据模型类
@property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
// 数据连接类
@property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;

- (NSURL *)applicationDocumentsDirectory;
- (void)saveContext;

- (void)insertDataName:(NSString *)name sex:(NSString *)sex;

@end
